package com.seed.core.configuration.relation;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.seed.core.pojo.seed.BelongsTos;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class BelongsToConfiguration extends RelationConfiguration {

    public BelongsTos toBelongsTo() {
        BelongsTos ret = new BelongsTos();
        ret.setTargetSeedName(seedName);
        ret.setLabel(label);
        ret.setComment(comment);
        ret.setSelfColumn(selfColumn);
        ret.setTargetColumn(targetColumn);
        ret.setExtra(extra);

        return ret;
    }

    public BelongsToConfiguration toFront() {
        BelongsToConfiguration ret = new BelongsToConfiguration();
        ret.setSeedName(seedName);
        ret.setLabel(label);
        ret.setComment(comment);
        ret.setExtra(extra);

        return ret;
    }
}
